(function(){
    var factory = {
        init: function(){
            var _this = this;

            _this.selector = $('#m-content');

            _this.handle();
        },
        handle: function(){
            var _this = this;

            _this.selector.delegate('.u-expend', 'click', function(){
                if($(this).hasClass('closed')){
                    $(this).parent('.card-title').next('.card-con').show();
                    $(this).removeClass('closed');
                }else{
                    $(this).parent('.card-title').next('.card-con').hide();
                    $(this).addClass('closed');
                }
            });

            _this.selector.delegate('.u-child-expend', 'click', function(){
                if($(this).hasClass('closed')){
                    $(this).parent('.log-card-title').next('.log-card-con').show();
                    $(this).removeClass('closed');
                }else{
                    $(this).parent('.log-card-title').next('.log-card-con').hide();
                    $(this).addClass('closed');
                }
            });
        }
    };

    module.exports = factory;
})();